package core.net.protocol;

import core.buffer.Buffer;

public abstract class FrameP implements IProtocol{

    public int frame;

    @Override
    public Buffer serialize(Buffer emptyBuffer) {
        emptyBuffer.writeInt(frame);
        return emptyBuffer;
    }

    @Override
    public void deserialize(Buffer data) {
        frame = data.readInt();
    }

    @Override
    public int size() {
        return 4;
    }

    @Override
    public String toString() {
        return "FrameP frame:"+frame;
    }
}
